//
//  RBMyMemberCell.m
//  zhongzhenglu
//
//  Created by XL on 2022/8/31.
//

#import "RBMyMemberCell.h"
#import "RBDefine.h"
#import "UIView+RBAdd.h"
#import <Masonry.h>
#import "RBThemeConfig.h"
#import <UIColor+YYAdd.h>
#import <UIView+YYAdd.h>
#import "RanTool.h"

@interface RBMyMemberCell()

@property(nonatomic, strong)UIImageView *iconImgView;
@property(nonatomic, strong)UILabel *nameL;
@property(nonatomic, strong)UILabel *desL;
@property(nonatomic, strong)UILabel *levelL;

@end

@implementation RBMyMemberCell

- (void)setCellModel:(RBCellModel *)cellModel
{
    if (!_iconImgView)
    {
        [self setup];
    }
}

- (void)setup
{
    self.backgroundColor = UIColor.whiteColor;
    [self rbSetCornerRadius:Zoom(8)];
    [self h_view_addView:({
        self.iconImgView = [RanTool imgViewWithMode:2 radius:Zoom(24) imgName:@"b1.jpg"];
        self.iconImgView;
    }) withHeight:Zoom(48) width:Zoom(48) top:CGFLOAT_MIN bottom:CGFLOAT_MIN left:Zoom(19) right:CGFLOAT_MIN centerY:YES];
    [self h_view_addView:({
        UIView *view = UIView.new;
        [view view_addView:({
            self.nameL = [RanTool labelWithFontSize:Zoom(16) weight:1 color:[RBThemeConfig textBlackColor] align:0 text:@"中正路平台商户1"];
            self.nameL;
        }) withHeight:CGFLOAT_MIN width:CGFLOAT_MIN top:0 bottom:0 left:0 right:0 centerX:0];
        [view view_addView:({
            self.desL = [RanTool labelWithFontSize:Zoom(14) weight:1 color:[RBThemeConfig textGrayColor] align:0 text:@"专业医疗器械、牙科用具等专业医疗器械、牙科用具等"];
            self.desL;
        }) withHeight:CGFLOAT_MIN width:CGFLOAT_MIN top:Zoom(11) bottom:0 left:0 right:0 centerX:0];
        view;
    }) withHeight:CGFLOAT_MIN width:CGFLOAT_MIN top:CGFLOAT_MIN bottom:CGFLOAT_MIN left:Zoom(15) right:0 centerY:YES];
    [self h_view_addView:({
        self.levelL = [RanTool labelWithFontSize:Zoom(16) weight:1 color:@"#F25B50" align:0 text:@"Lv.3"];
        [self.levelL addPriority:1];
        self.levelL;
    }) withHeight:CGFLOAT_MIN width:CGFLOAT_MIN top:0 bottom:0 left:Zoom(12) right:Zoom(20) centerY:0];
}

@end
